<template> 
    <div class="news">
        <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
            <p>刷新次数: {{ count }}</p>
        </van-pull-refresh>
    </div>  
    
</template>

<script>
export default {
  name: 'news',
  data() {
    return {
     count: 0,
      isLoading: false
    }
  },
   methods: {
    onRefresh() {
      setTimeout(() => {
        this.$toast('刷新成功');
        this.isLoading = false;
        this.count++;
      }, 500);
    }
  }
}
</script>
<style lang="scss" scoped>
    .news{
        height:100%
    }
</style>




